Joseph ben Meir ibn Megas or Megas (1077 - 1141) (Hebrew: יוסף בן מאיר הלוי אבן מיגאש) was a Rabbi, Posek, and Rosh Yeshiva in Lucena. He is also known as Ri Megas (ר"י מיגאש), the Hebrew acronym for "Rabbi Joseph Megas".
Ibn Megas was probably born in Seville (though Steinschneider believes it was Granada). He moved to Lucena at the age of 12 to study under the renowned Talmudist Isaac Alfasi. He studied under Alfasi at Lucena for fourteen years. Shortly before his death (1103), Alfasi ordained Ibn Megas as a rabbi, and - passing over his own son - also appointed him, then 26, to be his successor as Rosh Yeshiva (seminary head). Ibn Megas held this position for 38 years.
It is clear that ibn Megas was a great scholar: Maimonides in the introduction to his Mishnah commentary says "the Talmudic learning of this man amazes every one who understands his words and the depth of his speculative spirit; so that it might almost be said of him that his equal has never existed." Judah ha-Levi eulogizes him in six poems which are full of his praise. Ibn Megas's best known student is probably Maimon, the father and teacher of Maimonides.
There is a tradition that Maimonides himself was a pupil of ibn Megas. This probably arose from the frequent references in Maimonides' works to him as an authority. It is unlikely that he was literally taught by him, as Maimonides was 6 years old at the time of Ibn Megas's death.
Ibn Megas authored over 200 Responsa, "She'elot u-Teshuvot Ri Migash" - originally in Arabic - many of which are quoted in Bezalel Ashkenazi's Shittah Mekubetzet. He specified Chananel Ben Chushiel and Alfasi as his authorities.
He also authored a Talmudic commentary - ḥiddushim (novellae) on tractates Baba Batra (link here) and Shevuot (included in Joseph Samuel Modiano's Uryan Telitai, Salonica 1795) - which is quoted by various Rishonim. His other works have been lost.
Ibn Migas, Joseph (Jehosef) Ben Meïr Ha-Levi, jewishencyclopedia.com